﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 渐变.user_Form
{
    public partial class user_myBalance : Form
    {
        public user_myBalance()
        {
            InitializeComponent();
        }
        public string opname { get; set; }
        private void user_myBalance_Load(object sender, EventArgs e)
        {
            this.Dock = DockStyle.Fill;
            //根据姓名查询所剩余额
            string sql = "select umoney from uUser where uUsername=@uUsername";
            SqlParameter p = new SqlParameter("@uUsername", this.opname);
            DataTable dt = new DataTable();
            dt = DBHelper.ExecuteQuery(sql, p);
            txtBalance.Text = dt.Rows[0][0].ToString();

        }
    }
}
